
*******************************************************
*	This files checks the correlations 
* 	of our firm quality measure with the YELP categories
*******************************************************
  
clear all
use Yelp_Comparison
set more off

STOP STOP STOP

********************************************************************************************************
********TABLE
********************************************************************************************************

****Firm Quality Index and Yelp Ratings
**Aggregate
	reg avg_income_by_firm_quarter two_star three_star  i.year [aweight=lusers], rob
	outreg2 using "Output/Tables/Yelp_Niceness.tex", title() keep(two_star three_star) tex(landscape pr frag) drop() label addtext(Year FE, YES) ctitle("All Stores") nocons replace

*Restaurants
	reg avg_income_by_firm_quarter two_star three_star  i.year [aweight=lusers] if naics==722 , rob
	outreg2 using "Output/Tables/Yelp_Niceness.tex", title() keep(two_star three_star) tex(landscape pr frag) drop() label addtext(Year FE, YES) ctitle("Restaurants") nocons 
	
*General Stores:
	reg avg_income_by_firm_quarter two_star three_star  i.year [aweight=lusers] if naics==442|naics==443|naics==444|naics==451|naics==452|naics==453|naics==454, rob
	outreg2 using "Output/Tables/Yelp_Niceness.tex", title() keep(two_star three_star) tex(landscape pr frag) drop() label addtext(Year FE, YES) ctitle("General Stores") nocons 
	
*Clothing:
	reg avg_income_by_firm_quarter two_star three_star  i.year [aweight=lusers] if naics==448, rob
	outreg2 using "Output/Tables/Yelp_Niceness.tex", title() keep(two_star three_star) tex(landscape pr frag) drop() label addtext(Year FE, YES) ctitle("Clothing") nocons 

*Groceries:
	reg avg_income_by_firm_quarter two_star three_star  i.year [aweight=lusers] if naics==445 , rob
	outreg2 using "Output/Tables/Yelp_Niceness.tex", title() keep(two_star three_star) tex(landscape pr frag) drop() label addtext(Year FE, YES) ctitle("Groceries") nocons 
